<template>
  <div v-if="disabled" v-html="content" class="content"></div>
  <u-editor
    v-else
    ref='editor'
    v-model="content"
  ></u-editor>
</template>
<script>
  import UEditor from './UEditor'
  export default {
    name:"MyEditor",
    components: { UEditor },
    props:{
      value:{
        type:String,
        default:""
      },
      disabled:{
        type:Boolean,
        default:false
      }
    },
    computed:{
      content:{
        get(){
          return this.value
        },
        set(v){
          this.$emit("input",v)
        }
      }
    }
  }
</script>
<style lang="scss" scoped>
  .content{
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    padding: 0 15px;
    background-color: #F5F7FA;
    border-color: #dfe4ed;
    min-height: 500px;
    max-height: 500px;
    overflow: auto;
  }
</style>
